package String.question;

import org.junit.Test;

import static com.sun.org.apache.xalan.internal.lib.ExsltStrings.split;

public class StringTestDemo {
    @Test
    public void test01(){
        String s1 = "aaabbb";
        String s2 = "aaa" + "bbb";
        String s3 = new String("aaabbb");
        String s4 = new String ("aaabbb");
        System.out.println(s1 == s2);
        System.out.println(s1 == s3);
        System.out.println(s3 == s4);


        String a = "aaaaaabbccbbb";
        String b = "bb";
        String[] c=  a.split("bb");
        System.out.println(c.length );


        String d = a.replaceAll(b,"");
        System.out.println(a.length()- d.length());
    }
}
